shout3d.core
Class MouseInput

java.lang.Object
  |
  +--shout3d.core.DeviceInput
        |
        +--shout3d.core.MouseInput

public class MouseInput
extends DeviceInput

A class for describing basic mouse input. Note that secondary (right, middle) buttons are not provided for. This is because a single button is cross-platform.


Field Summary
 int button
          Indicates which button of the mouse was pressed.
static int DOWN
          This flag indicates that the mouse button was pressed.
static int DRAG
          This flag indicates that the mouse button was dragged.
static int ENTER
          This flag indicates that the mouse cursor entered the graphics context area.
static int EXIT
          This flag indicates that the mouse cursor exited the graphics context area.
static int MOVE
          This flag indicates that the mouse button was moved.
static int UP
          This flag indicates that the mouse button was released.
 int which
          Indicates which type of input (DOWN, UP, MOVE, or DRAG) was received.
 int x
          Indicates the x location of the mouse when the input was received.
 int y
          Indicates the y location of the mouse when the input was received.
 
Fields inherited from class shout3d.core.DeviceInput
ALT_MASK, CTRL_MASK, META_MASK, modifiers, SHIFT_MASK, timeStamp
 
Constructor Summary
MouseInput()
          Constructs a MouseInput
MouseInput(int which, int x, int y, int button, int modifiers, double timeStamp)
          Constructs a MouseInput
 
Methods inherited from class shout3d.core.DeviceInput
getTypeName, isOfType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOWN

public static final int DOWN
This flag indicates that the mouse button was pressed.

UP

public static final int UP
This flag indicates that the mouse button was released.

MOVE

public static final int MOVE
This flag indicates that the mouse button was moved.

DRAG

public static final int DRAG
This flag indicates that the mouse button was dragged.

ENTER

public static final int ENTER
This flag indicates that the mouse cursor entered the graphics context area.

EXIT

public static final int EXIT
This flag indicates that the mouse cursor exited the graphics context area.

which

public int which
Indicates which type of input (DOWN, UP, MOVE, or DRAG) was received.

x

public int x
Indicates the x location of the mouse when the input was received.

y

public int y
Indicates the y location of the mouse when the input was received.

button

public int button
Indicates which button of the mouse was pressed. 0 is left, 1 is right.
Constructor Detail

MouseInput

public MouseInput()
Constructs a MouseInput

MouseInput

public MouseInput(int which,
                  int x,
                  int y,
                  int button,
                  int modifiers,
                  double timeStamp)
Constructs a MouseInput